Skip to content

fix: improve bridge message when agent socket is not found#157

Merged
benvinegar merged 1 commit intomainfrom
fix/bridge-no-socket-message
Feb 24, 2026
Merged

fix: improve bridge message when agent socket is not found#157
benvinegar merged 1 commit intomainfrom
fix/bridge-no-socket-message

Conversation

@baudbot-agent
Copy link
Collaborator

Problem

When the bridge can't find the agent's pi socket, it tells the user "Agent is starting up — try again in a moment." This is misleading — the usual cause is a stale session UUID or a crashed agent, not a slow startup.

Fix

Replace with a more accurate and actionable message:

🔌 Agent is not connected — it may be restarting or the session expired. Run sudo baudbot restart to bring it back.

Testing

All 15 test suites pass (bin/test.sh).

Replace the misleading 'Agent is starting up' message with a more
actionable one that tells the user the agent is not connected and
suggests running 'sudo baudbot restart' to fix it.

The old message assumed the agent was booting, but the common cause
is a stale session UUID or a crashed agent process.
@greptile-apps
Copy link

greptile-apps bot commented Feb 24, 2026

Greptile Summary

Improved the error message shown to users when the Slack bridge cannot find the agent's socket. Changed from misleading "Agent is starting up" to a more accurate message indicating the agent may be disconnected, restarting, or the session expired, with actionable recovery instructions (sudo baudbot restart).

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Single-line change to improve user-facing error message with more accurate and actionable guidance. No logic changes, no security implications, and tests pass.
  • No files require special attention

Important Files Changed

Filename Overview
slack-bridge/broker-bridge.mjs Updated error message for missing agent socket to be more accurate and actionable

Last reviewed commit: 8bc0e66

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

if (!currentSocket) {
logError("🔌 no pi socket found — agent may not be running");
await say(event.channel, " Agent is starting uptry again in a moment.", event.ts);
await say(event.channel, "🔌 Agent is not connectedit may be restarting or the session expired. Run `sudo baudbot restart` to bring it back.", event.ts);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy bridge in bridge.mjs:268 still has the old "Agent is starting up" message. Consider updating it to match this improved message for consistency.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: slack-bridge/broker-bridge.mjs
Line: 702

Comment:
The legacy bridge in `bridge.mjs:268` still has the old "Agent is starting up" message. Consider updating it to match this improved message for consistency.

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

@benvinegar benvinegar merged commit 7fc9762 into main Feb 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants